home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / mail-tools / thor / thor_2.22 / updatethor < prev    next >
Text File  |  1996-02-26  |  23KB  |  988 lines

  1. ;*************************************************************************
  2. ;    Title:
  3. ;        UpdateThor
  4. ;*************************************************************************
  5. ;    Description:
  6. ;        Commodore Installer Script for the Thor 2.1 software
  7. ;*************************************************************************
  8. ;    Author:
  9. ;        Øyvind Ellefsen - versions for THOR upto 1.22
  10. ;       Petter Nilsen   - versions for 1.25 ->
  11. ;*************************************************************************
  12. ;    Still to do:
  13. ;        - THOR.macros might not be correct. Notify user?
  14. ;        - Handle previous installations with one of the env-vars/assigns
  15. ;          missing.
  16. ;        - Show .readme file
  17. ;       - Not delete catalogs/, only the needed dirs
  18. ;
  19. ;*************************************************************************
  20. ;
  21. ;******************************************************
  22. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  23. ;******************************************************
  24.  
  25. ; some useful variables
  26.     (set true 1)
  27.     (set false 0)
  28.     (set yes true)
  29.     (set no false)
  30.     (set is_a_file 1)
  31.     (set is_a_dir 2)
  32.     (set quote "\"")
  33.     (set newline "\n")
  34.     (set nothing "")
  35.     (set V3_Update no)
  36.  
  37. ; set up our delete options
  38.     (delopts "AskUser" "OkNoDelete" "Force")
  39.  
  40. ; some useful procedures
  41.     ; change userlevel to expert
  42.     (procedure expert_level
  43.         (
  44.             (user 2)
  45.         )
  46.     )
  47.  
  48. ; reset userlevel back to default
  49.     (procedure default_level
  50.         (
  51.             (user default-level)
  52.         )
  53.     )
  54.  
  55. ; store off userlevel
  56.     (procedure save_default_level
  57.         (
  58.             (set default-level @user-level)
  59.         )
  60.     )
  61.  
  62. ; some overused strings
  63. (set omp (cat "One moment please..." newline))
  64.  
  65.  
  66. ; introduce ourselfs to the viewers
  67. (welcome "Welcome to the Thor installer.  This installer uses "
  68.     "the Commodore Amiga Installer.  All of our future Thor releases "
  69.     "will be using this installer and we would like to get any feedback "
  70.     "that might help to improve the installation procedure." newline
  71. )
  72.  
  73.  
  74. ; first reset the user level so that the novice can see whats going on
  75.     (save_default_level)
  76.     (expert_level)
  77.  
  78. ;Make assign to install from
  79.     (makeassign "Thor_Install" "" (safe))
  80.  
  81.  
  82. ;******************
  83. ;** Check Memory **
  84. ;******************
  85.  
  86. (run "Avail flush")
  87.  
  88. (set Running (run "Thor_Install:CheckForLib"))
  89.  
  90. (while (= Running 20)
  91.       ((Message newline "Thor seem to be running, you MUST close it NOW."    
  92.         newline "If you don't, the installation will fail!")
  93.     (run "Avail flush")
  94.     (set Running (run "Thor_Install:CheckForLib")))
  95. )
  96.  
  97. ;************************
  98. ;** Start Installation **
  99. ;************************
  100.  
  101. (if (exists "ENV:THOR/THORPath" (noreq))
  102. (
  103.     (if (set Thor_Dir (getenv "THOR/THORPath"))
  104.     (
  105.         (set Thor_Dir (substr Thor_Dir 0 (- (strlen Thor_Dir) 1)))
  106.         (set Thor_Dir (expandpath Thor_Dir))
  107.         (set V3_Update yes)
  108.         (makeassign "Thor" Thor_Dir (safe))
  109.     )
  110.     ; Else
  111.     (
  112.         (if (exists "Thor:libs/bbsread.library" (noreq))
  113.             ; Then
  114.             (    
  115.                 (set Thor_Dir (expandpath "Thor:"))
  116.             )
  117.             ; Else
  118.             (
  119.                 (set end_text "Please use the InstallThor script for a first-time installation.")
  120.                 (abort end_text))
  121.             )
  122.         )
  123.     )
  124. )
  125. ; Else
  126. (
  127.     (if (exists "Thor:libs/bbsread.library" (noreq))
  128.         ; Then
  129.         (    
  130.             (set Thor_Dir (expandpath "Thor:"))
  131.         )
  132.         ; Else
  133.         (
  134.             (set end_text "Please use the InstallThor script for a first-time installation.")
  135.             (abort end_text))
  136.         )
  137.     )
  138. )
  139.  
  140. (if (exists "ENV:THOR/THORPath" (noreq))
  141. (
  142.     (if (set BBSData_Dir (getenv "THOR/BBSDataPath"))
  143.     (
  144.         (set BBSData_Dir (substr BBSData_Dir 0 (- (strlen BBSData_Dir) 1)))
  145.         (set BBSData_Dir (expandpath BBSData_Dir))
  146.         (set V3_Update yes)
  147.         (makeassign "BBSData" BBSData_Dir (safe))
  148.     )
  149.     ; Else
  150.     (
  151.         (if (exists "BBSData:global.config" (noreq))
  152.             ; Then
  153.             (
  154.                 (set BBSData_Dir (expandpath "BBSData:"))
  155.             )
  156.             ; Else
  157.             (
  158.                 (set end_text "Please use the InstallThor script for a first-time installation.")
  159.                 (abort end_text))
  160.             )
  161.         )
  162.     )
  163. )
  164. ; Else
  165. (
  166.     (if (exists "BBSData:global.config" (noreq))
  167.         ; Then
  168.         (
  169.             (set BBSData_Dir (expandpath "BBSData:"))
  170.         )
  171.         ; Else
  172.         (
  173.             (set end_text "Please use the InstallThor script for a first-time installation.")
  174.             (abort end_text))
  175.         )
  176.     )
  177. )
  178.  
  179. ;**********************************************
  180. ;** Move ARexx scripts to another directory..**
  181. ;**********************************************
  182.  
  183. (if (askbool
  184.         (prompt
  185.             "The THOR ARexx script distribution has changed. "
  186.             "The old directory with ARexx scripts can be moved "
  187.             "to a Rexx_Old directory. \n\n"
  188.             "Press 'Yes' to continue with backup of old ARexx scripts.")
  189.         (help
  190.             "The installer has determined that you may already have a " 
  191.             "copy of Thor installed on your system. "
  192.             "ARexx files from a previous installation can be moved to "
  193.             "a safe directory."
  194.         )
  195.         (default 1)
  196.     )
  197.     ; Then
  198.     ( 
  199.         (makedir "THOR:Rexx_Old")
  200.         (copyfiles
  201.             (source "Thor:rexx")
  202.             (dest "THOR:rexx_old")
  203.             (all)
  204.         )
  205.         (working omp "Deleting old ARexx files...")
  206.         (run "Delete THOR:rexx/~(postinglists|#?.cfg|#?.adr) all")
  207.     )
  208. )
  209.  
  210.  
  211. ;**********************************************
  212. ;** Hostile deletion of old files here.. ******
  213. ;**********************************************
  214.  
  215. (expert_level)
  216.  
  217. (if (= V3_Update no)
  218.     (
  219.         (if (askbool
  220.                 (prompt "Several old files left over from the the THOR 1.x" newline
  221.                     "releases are now obsolete and should be deleted." newline
  222.                     "This applies to the following directories: " newline
  223.                     "THOR:bin, THOR:s, THOR:libs and THOR:Scripts. " newline
  224.                     "If you have made any ARexx-scripts for Thor 1.xx,\n"
  225.                     "they might not work anymore. Check out the new\n"
  226.                     "ARexx-documentation and change your scripts accordingly.\n\n"
  227.                     "You might want to make a backup of personal files " newline
  228.                     "before proceeding." newline
  229.                     "Press 'Yes' to continue with deletion of obsolete files")
  230.                 (help
  231.                     "The installer has determined that you may already have a " 
  232.                     "copy of Thor installed on your system. "
  233.                     "Several files have changed and should be deleted since they "
  234.                     "will not function correctly with this release of THOR. "
  235.                 )
  236.                 (default 1)
  237.             )
  238.             ; Then
  239.             ( 
  240.                 (run "Delete THOR:ThorStat#?")
  241.                 (run "Delete THOR:THOR.history")
  242.                 (run "Delete THOR:libs/#?")
  243.                 (run "Delete THOR:bin/#?")
  244.                 (run "Delete THOR:s/#?")
  245.                 (run "Delete THOR:Scripts/#?")
  246.                 (run "Delete THOR:#?guide#?")
  247.                 (run "Delete THOR:THOR")
  248.                 (run "Rename THOR:THOR.info THOR:THOR.old.info")
  249.                 (run "Delete THOR:THOR.info")
  250.                 (run "Delete libs:bbsread.library")
  251.             )
  252.         )
  253.     )
  254. )
  255. ; Else
  256. ;(
  257. ;    (if (askbool
  258. ;            (prompt
  259. ;                "Due to a problem with MultiUser filesystem, "
  260. ;                "old files must be deleted before installing "
  261. ;                "the new files. This is not needed if you do not "
  262. ;                "run this filesystem on the partition THOR is "
  263. ;                "installed on. Please take a backup of any personal ARexx "
  264. ;                "scripts you might have made before selecting 'Yes' here.\n\n"
  265. ;                "Press 'Yes' to continue with deletion of old files.")
  266. ;            (help
  267. ;                "The installer has determined that you may already have a " 
  268. ;                "copy of Thor installed on your system. "
  269. ;                "Old files from a previous installation must be deleted "
  270. ;                "if you are running the MultiUser filesystem on the "
  271. ;                "partition THOR is installed on."
  272. ;            )
  273. ;            (default 1)
  274. ;        )
  275. ;        ; Then
  276. ;        ( 
  277. ;            (run "Delete THOR:ThorStat#?")
  278. ;            (run "Delete THOR:THOR.history")
  279. ;            (run "Delete THOR:libs/#?")
  280. ;            (run "Delete THOR:l/#?")
  281. ;            (run "Delete THOR:docs/#?")
  282. ;            (run "Delete THOR:bin/#?")
  283. ;            (run "Delete THOR:s/#?")
  284. ;            (run "Delete THOR:unix/#?")
  285. ;            (run "Delete THOR:rexx/~(postinglists) all")
  286. ;            (run "Delete THOR:Scripts/#?")
  287. ;            (run "Delete THOR:#?guide#?")
  288. ;            (run "Delete THOR:THOR")
  289. ;            (run "Rename THOR:THOR.info THOR:THOR.old.info")
  290. ;            (run "Delete THOR:ConfigTHOR")
  291. ;            (run "Rename THOR:ConfigTHOR.info THOR:ConfigTHOR.old.info")
  292. ;            (run "Delete THOR:ConnectTHOR")
  293. ;            (run "Rename THOR:ConnectTHOR.info THOR:ConnectTHOR.old.info")
  294. ;        )
  295. ;    )
  296. ;)
  297.  
  298. (run "Rename THOR:THOR.info THOR:THOR.old.info")
  299. (run "Rename THOR:ConfigTHOR.info THOR:ConfigTHOR.old.info")
  300. (run "Rename THOR:ConnectTHOR.info THOR:ConnectTHOR.old.info")
  301. (run "Delete libs:bbsread.library")
  302. (run "Delete libs:bbsreadcnv2.library")
  303. (run "Delete libs:utgui.library")
  304. (run "Delete l:bbsread-handler")
  305. (run "Delete l:bbsreadrexx-handler")
  306. (run "Delete THOR:bin/initsoup")
  307. (run "Delete THOR:bin/configuucp")
  308.  
  309. ;******************
  310. ;** Locale stuff **
  311. ;******************
  312.  
  313. (default_level)
  314.  
  315. (set catalog
  316.    (askoptions
  317.       (prompt "What languages would you like to install ?\n"
  318.             "English is the built-in language.")
  319.       (help
  320.             "This will install locale files for other languages than English. "
  321.             "You can set the prefered language on Workbench and in Thor by"
  322.             "using the prefs:locale tool." newline @askchoice-help
  323.       )
  324.       (choices "Norsk" "Dansk" "Svenska" "Deutsch")
  325.       (default 0)
  326.    )
  327. )
  328.  
  329. ; Delete previous installed catalog files.
  330.  
  331. (if (= V3_Update yes)
  332.     (
  333.         (run "delete thor:catalogs all")
  334.     )
  335. )
  336.  
  337. (makedir "thor:catalogs")
  338.  
  339. (if (bitand 1 catalog)
  340.     (copyfiles
  341.         (source "Thor_Install:catalogs/norsk")
  342.         (dest "thor:catalogs/norsk")
  343.         (all)
  344.     )
  345. )
  346.  
  347. (if (bitand 2 catalog)
  348.     (copyfiles
  349.         (source "Thor_Install:catalogs/dansk")
  350.         (dest "thor:catalogs/dansk")
  351.         (all)
  352.     )
  353. )
  354.  
  355. (if (bitand 4 catalog)
  356.     (copyfiles
  357.         (source "Thor_Install:catalogs/svenska")
  358.         (dest "thor:catalogs/svenska")
  359.         (all)
  360.     )
  361. )
  362.  
  363. (if (bitand 8 catalog)
  364.     (copyfiles
  365.         (source "Thor_Install:catalogs/deutsch")
  366.         (dest "thor:catalogs/deutsch")
  367.         (all)
  368.     )
  369. )
  370.  
  371. ;***********************************
  372. ;***** GET FIRST DISK IN HERE ******
  373. ;***********************************
  374.  
  375. ; first copy over the stuff
  376. (working omp "Decompressing and copying Thor files.")
  377.  
  378. (run "Thor_Install:lha -a x Thor_Install:thor.lha THOR:" )
  379.  
  380. ;*********************
  381. ;** reqtools.libary **
  382. ;*********************
  383.  
  384. (copylib
  385.     (prompt "Copying ReqTools library")
  386.     (help "This will copy the ReqTools library." newline @copylib-help)
  387.     (source "Thor_Install:reqtools.library")
  388.     (dest "libs:")
  389. )
  390.  
  391. ;************************
  392. ;**  Copy the keyfile  **
  393. ;************************
  394. (if (exists "Thor_Install:THOR.key" (noreq))
  395. ; Then
  396.     (copyfiles
  397.         (source "Thor_Install:THOR.key")
  398.         (dest "THOR:")
  399.     )
  400. )
  401.         
  402. ;**********************************************
  403. ;* Convert the database to the new 2.0 format *
  404. ;**********************************************
  405.  
  406. (run "thor:bin/InitCharsets")
  407.  
  408. (expert_level)
  409.  
  410. (if (= V3_Update no)
  411.     (
  412.         (message newline "The installer will now convert and upgrade the "
  413.         newline "message database to the new 2.0 format."
  414.         newline "This might take some time, so please be patient.")
  415.         (run "Avail flush")
  416.         (set Running (run "Thor:bin/basemanager convert >con:0/0/640/200/Converting/AUTO/CLOSE/WAIT"))
  417.         (if (<> 0 Running)
  418.         (
  419.             ((set end_text "Conversion of your old database failed." newline "Please take notice of the error message shown.")
  420.             (abort end_text)))
  421.         )
  422.     )
  423.     (set failed (run "thor:bin/initarc"))
  424.     (if (<> 0 failed)
  425.         (
  426.             ((set end_text "Installation failed.\nIf you received any error message,\nplease write this down and send us\na mail about the problem.")
  427.             (abort end_text))
  428.         )
  429.     )
  430. )
  431.  
  432. (if (exists "Thor_Install:bin/parseqwk" (noreq))
  433.     ; Then
  434.     (
  435.         (set bbspack 1)
  436.     )
  437.     ; Else
  438.     (
  439.         (if    (askbool
  440.                 (prompt newline 
  441.                                 "Would you like to install the modules for "
  442.                                 "QWK, Fido, Hippo, Bluewave, ABBS/MBBS and Omen "
  443.                                 "to be used with Bulletin Board Systems?\n\n "
  444.                                 "(you will be able to select which modules to "
  445.                                 "install later in this installtions procedure).")
  446.                 (help newline
  447.                                 "This section of the installation is dedicated "
  448.                                 "to installation of some common formats "
  449.                                 "required if you want to use THOR with BBSes.\n\n"
  450.                                 "Select YES if you want to continue with this "
  451.                                 "installation, otherwise NO")
  452.                 (default 1)
  453.             )
  454.             ; Then 
  455.             (
  456.                 (set bbsfile 
  457.                     (askfile
  458.                         (prompt 
  459.                                 "Please select the BBS archive for THOR 2.2. "
  460.                                 "(Usually named 'thor22_bbs.lha').\n\n"
  461.                                 "It will be unarchived automatically.")
  462.                         (help @askfile-help)
  463.                         (default "sys:")
  464.                     )
  465.                 )
  466.                 ; verify that the file exists
  467.                 (if (exists bbsfile)
  468.                     (
  469.                         (set runfile (cat runfile "Thor_Install:lha -a x " quote bbsfile quote " Thor_Install:"))
  470.                         (set failed (run runfile))
  471.                         (if (<> 0 failed)
  472.                         (
  473.                             ((set failed_text "Unarchiving of the BBS archive failed.")
  474.                             (message end_text)))
  475.                         )
  476.                         ; Else
  477.                         (
  478.                             (set bbspack 1)
  479.                         )
  480.                     )
  481.                 )
  482.             )
  483.         )
  484.     )
  485. )
  486.  
  487. (if (exists "Thor_Install:bin/gettcp" (noreq))
  488.     ; Then
  489.     (
  490.         (set inetpack 1)
  491.     )
  492.     ; Else
  493.     (
  494.         (if    (askbool
  495.                 (prompt newline 
  496.                                 "Would you like to install the modules for "
  497.                                 "UUCP, SOUP, NNTP, SMTP and POP3 "
  498.                                 "to be used with Internet?\n\n"
  499.                                 "(you will be able to select which modules to "
  500.                                 "install later in this installtions procedure).")
  501.                 (help newline
  502.                                 "This section of the installation is dedicated "
  503.                                 "to installation of some common formats "
  504.                                 "required if you want to use THOR with Internet.\n\n"
  505.                                 "Select YES if you want to continue with this "
  506.                                 "installation, otherwise NO")
  507.                 (default 1)
  508.             )
  509.             ; Then 
  510.             (
  511.                 (set inetfile 
  512.                         (askfile
  513.                             (prompt 
  514.                                     "Please select the Internet archive for THOR 2.2\n"
  515.                                     "(Usually named 'thor22_inet.lha').\n\n"
  516.                                     "It will be unarchived automatically."
  517.                             (help @askfile-help)
  518.                             (default "sys:")
  519.                         )
  520.                     )
  521.                 )
  522.                 ; verify that the file exists
  523.                 (if (exists inetfile)
  524.                     (
  525.                         (set runfile2 (cat runfile2 "Thor_Install:lha -a x " quote inetfile quote " Thor_Install:"))
  526.                         (set failed (run runfile2))
  527.                         (if (<> 0 failed)
  528.                         (
  529.                             ((set failed_text "Unarchiving of the Internet archive failed.")
  530.                             (message end_text)))
  531.                         )
  532.                         ; Else
  533.                         (
  534.                             (set inetpack 1)
  535.                         )
  536.                     )
  537.                 )
  538.             )
  539.         )
  540.     )
  541. )
  542.  
  543. (if (= bbspack 1)
  544.     (
  545.         (set bbs_type
  546.            (askoptions
  547.               (prompt
  548.                         "Please select which BBS modules "
  549.                         "you want to install.")
  550.               (help
  551.                     "What system type for BBS usage that should be "
  552.                     "installed can be selected here."
  553.               )
  554.  
  555.               (choices
  556.                     "QWK        - Normal QWK"
  557.                     "Fido       - Normal Fidonet"
  558.                     "BlueWave   - Normal BlueWave"
  559.                     "ABBS       - Normal ABBS"
  560.                     "ABBS_QWK   - ABBS with QWK support"
  561.                     "MBBS       - Normal MBBS"
  562.                     "Hippo/BBBS - Normal Hippo V2 and Hippo on BBBS"
  563.                     "Omen       - Normal Omen"
  564.               )
  565.               (default 512)
  566.            )
  567.         )
  568.         (copyfiles
  569.             (source "Thor_Install:scripts")
  570.             (dest "THOR:scripts")
  571.             (pattern "#?BBS#?")
  572.         )
  573.         (if (bitand 1 bbs_type)
  574.             (
  575.                 (copyfiles
  576.                     (source "Thor_Install:bin")
  577.                     (dest "THOR:bin")
  578.                     (pattern "#?QWK")
  579.                 )
  580.                 (copyfiles
  581.                     (source "Thor_Install:s/cfgqwk")
  582.                     (dest "THOR:s")
  583.                 )
  584.                 (execute "thor:s/cfgqwk")
  585.             )
  586.         )
  587.         (if (bitand 2 bbs_type)
  588.             (
  589.                 (copyfiles
  590.                     (source "Thor_Install:bin")
  591.                     (dest "THOR:bin")
  592.                     (pattern "#?FIDO")
  593.                 )
  594.                 (copyfiles
  595.                     (source "Thor_Install:s/cfgfido")
  596.                     (dest "THOR:s")
  597.                 )
  598.                 (execute "thor:s/cfgfido")
  599.             )
  600.         )
  601.         (if (bitand 4 bbs_type)
  602.             (
  603.                 (copyfiles
  604.                     (source "Thor_Install:bin")
  605.                     (dest "THOR:bin")
  606.                     (pattern "#?BLUE")
  607.                 )
  608.                 (copyfiles
  609.                     (source "Thor_Install:s/cfgblue")
  610.                     (dest "THOR:s")
  611.                 )
  612.                 (execute "thor:s/cfgblue")
  613.             )
  614.         )
  615.         (if (bitand 8 bbs_type)
  616.             (
  617.                 (copyfiles
  618.                     (source "Thor_Install:bin/packambbs")
  619.                     (dest "THOR:bin")
  620.                 )
  621.                 (copyfiles
  622.                     (source "Thor_Install:bin/parsemsg")
  623.                     (dest "THOR:bin")
  624.                 )
  625.                 (copyfiles
  626.                     (source "Thor_Install:s/cfgabbs")
  627.                     (dest "THOR:s")
  628.                 )
  629.                 (execute "thor:s/cfgabbs")
  630.             )
  631.         )
  632.         (if (bitand 16 bbs_type)
  633.             (
  634.                 (copyfiles
  635.                     (source "Thor_Install:bin")
  636.                     (dest "THOR:bin")
  637.                     (pattern "#?QWK")
  638.                 )
  639.                 (copyfiles
  640.                     (source "Thor_Install:s/cfgabbs_qwk")
  641.                     (dest "THOR:s")
  642.                 )
  643.                 (execute "thor:s/cfgabbs_qwk")
  644.             )
  645.         )
  646.         (if (bitand 32 bbs_type)
  647.             (
  648.                 (copyfiles
  649.                     (source "Thor_Install:bin/packambbs")
  650.                     (dest "THOR:bin")
  651.                 )
  652.                 (copyfiles
  653.                     (source "Thor_Install:bin/parsemsg")
  654.                     (dest "THOR:bin")
  655.                 )
  656.                 (copyfiles
  657.                     (source "Thor_Install:s/cfgmbbs")
  658.                     (dest "THOR:s")
  659.                 )
  660.                 (execute "thor:s/cfgmbbs")
  661.             )
  662.         )
  663.         (if (bitand 64 bbs_type)
  664.             (
  665.                 (copyfiles
  666.                     (source "Thor_Install:bin")
  667.                     (dest "THOR:bin")
  668.                     (pattern "#?hippo")
  669.                 )
  670.                 (copyfiles
  671.                     (source "Thor_Install:s/cfghippo")
  672.                     (dest "THOR:s")
  673.                 )
  674.                 (copyfiles
  675.                     (source "Thor_Install:s/cfgbbbs")
  676.                     (dest "THOR:s")
  677.                 )
  678.                 (execute "thor:s/cfghippo")
  679.                 (execute "thor:s/cfgbbbs")
  680.             )
  681.         )
  682.         (if (bitand 128 bbs_type)
  683.             (
  684.                 (copyfiles
  685.                     (source "Thor_Install:bin")
  686.                     (dest "THOR:bin")
  687.                     (pattern "#?omen")
  688.                 )
  689.                 (copyfiles
  690.                     (source "Thor_Install:s/cfgomen")
  691.                     (dest "THOR:s")
  692.                 )
  693.                 (execute "thor:s/cfgomen")
  694.             )
  695.         )
  696.     )
  697. )
  698.  
  699. (if (= inetpack 1)
  700.     (
  701.         (set bbs_type
  702.            (askoptions
  703.               (prompt
  704.                         "Please select which Internet modules "
  705.                         "you want to install.")
  706.               (help
  707.                     "What system type for Internet usage that should be "
  708.                     "installed can be selected here."
  709.               )
  710.  
  711.               (choices
  712.                         "TCP/TCP_ONLINE - POP3, SMTP and NNTP"
  713.                         "SOUP/UQWK_SOUP - Normal SOUP and SOUP w/uqwk"
  714.                         "UUCP           - Normal UUCP"
  715.               )
  716.               (default 7)
  717.            )
  718.         )
  719.  
  720.         (copyfiles
  721.             (source "Thor_Install:libs/utnet.library")
  722.             (dest "THOR:libs")
  723.         )
  724.  
  725.         (copyfiles
  726.             (source "Thor_Install:bin/InitRFC")
  727.             (dest "THOR:bin")
  728.         )
  729.  
  730.         (copyfiles
  731.             (source "Thor_Install:scripts")
  732.             (dest "THOR:scripts")
  733.             (pattern "#?UQWK#?")
  734.         )
  735.  
  736.         (if (bitand 1 bbs_type)
  737.             (
  738.                 (copyfiles
  739.                     (source "Thor_Install:bin")
  740.                     (dest "THOR:bin")
  741.                     (pattern "#?TCP")
  742.                 )
  743.                 (copyfiles
  744.                     (source "Thor_Install:")
  745.                     (dest "THOR:")
  746.                     (pattern "ConnectTHOR#?")
  747.                 )
  748.                 (copyfiles
  749.                     (source "Thor_Install:s/cfgtcp")
  750.                     (dest "THOR:s")
  751.                 )
  752.                 (copyfiles
  753.                     (source "Thor_Install:s/cfgtcp_online")
  754.                     (dest "THOR:s")
  755.                 )
  756.                 (execute "thor:s/cfgtcp")
  757.                 (execute "thor:s/cfgtcp_online")
  758.             )
  759.         )
  760.         (if (bitand 2 bbs_type)
  761.             (
  762.                 (copyfiles
  763.                     (source "Thor_Install:bin")
  764.                     (dest "THOR:bin")
  765.                     (pattern "#?SOUP")
  766.                 )
  767.                 (copyfiles
  768.                     (source "Thor_Install:s")
  769.                     (dest "THOR:s")
  770.                     (pattern "#?soup")
  771.                 )
  772.                 (makedir "THOR:unix")
  773.                 (copyfiles
  774.                     (source "Thor_Install:unix")
  775.                     (dest "THOR:unix")
  776.                     (all)
  777.                 )
  778.                 (execute "thor:s/cfguqwk_soup")
  779.                 (execute "thor:s/cfgsoup")
  780.             )
  781.         )
  782.         (if (bitand 4 bbs_type)
  783.             (
  784.                 (copyfiles
  785.                     (source "Thor_Install:bin")
  786.                     (dest "THOR:bin")
  787.                     (pattern "#?UUCP")
  788.                 )
  789.                 (copyfiles
  790.                     (source "Thor_Install:s/cfguucp")
  791.                     (dest "THOR:s")
  792.                 )
  793.                 (execute "thor:s/cfguucp")
  794.             )
  795.         )
  796.     )
  797. )
  798.  
  799.  
  800. ;*********************************************
  801. ;** Copy configfiles from BBSDATA: to THOR: **
  802. ;*********************************************
  803.  
  804. (if (= V3_Update no)
  805.     (
  806.         (run "copy bbsdata:visual.config thor:visual.config")
  807.         (run "copy bbsdata:global.config thor:global.config")
  808.         (run "copy bbsdata:fse.config thor:fse.config")
  809.     )
  810. )
  811.  
  812. ;***********
  813. ;** Fonts **
  814. ;***********
  815.     
  816. (if (= V3_Update no)
  817.     (
  818.         (copyfiles
  819.             (prompt "Choose the fonts to install with Thor" newline "These are not required for Thor to run" )
  820.             (help "This will copy the default font files for Thor." newline @copyfiles-help)
  821.             (source "Thor_Install:Fonts")
  822.             (dest "Fonts:")
  823.             (fonts)
  824.             (choices "Grn" "Thin609" "Thin611" "Thin711")
  825.             (confirm)
  826.         )
  827.     )
  828. )
  829.  
  830. ;*****************************
  831. ;****** Install icons ********
  832. ;*****************************
  833.  
  834. (set icon
  835.     (askchoice
  836.         (prompt
  837.             "Please select what icon-set to install with THOR.\n")
  838.         (help
  839.             "If you use MagicWB on your Workbench, "
  840.             "you might want to install the special MagicWB icons.\n\n"
  841.             "Likewise, if you use NewIcons on your Workbench, "
  842.             "you might want to install the special NewIcons icons.")
  843.         (choices "Normal icons" "MagicWB icons" "NewIcons icons")
  844.         (default 0)
  845.     )
  846. )
  847.  
  848. (if (= icon 1)
  849.     (
  850.         (copyfiles
  851.             (prompt "Copying MagicWB icon files")
  852.             (source "Thor_Install:MWBIcons")
  853.             (dest "Thor:")
  854.             (pattern "~(THOR.guide.info)")
  855.             (nogauge)
  856.         )
  857.         (copyfiles
  858.             (prompt "Copying MagicWB icon files")
  859.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  860.             (dest "Thor:Docs")
  861.             (newname "THOR.guide.info")
  862.             (nogauge)
  863.         )
  864.         (copyfiles
  865.             (prompt "Copying MagicWB icon files")
  866.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  867.             (dest "Thor:Docs")
  868.             (newname "ConfigTHOR.guide.info")
  869.             (nogauge)
  870.         )
  871.         (copyfiles
  872.             (prompt "Copying MagicWB icon files")
  873.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  874.             (dest "Thor:Docs")
  875.             (newname "ARexx.guide.info")
  876.             (nogauge)
  877.         )
  878.         (copyfiles
  879.             (prompt "Copying MagicWB icon files")
  880.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  881.             (dest "Thor:Docs")
  882.             (newname "BBSReadRexx.guide.info")
  883.             (nogauge)
  884.         )
  885.         (copyfiles
  886.             (prompt "Copying MagicWB icon files")
  887.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  888.             (dest "Thor:Docs")
  889.             (newname "THOR_Rexx.guide.info")
  890.             (nogauge)
  891.         )
  892.         (copyfiles
  893.             (prompt "Copying MagicWB icon files")
  894.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  895.             (dest "Thor:Docs")
  896.             (newname "Installation.guide.info")
  897.             (nogauge)
  898.         )
  899.     )
  900. )
  901. (if (= icon 2)
  902.     (
  903.         (copyfiles
  904.             (prompt "Copying NewIcons icon files")
  905.             (source "Thor_Install:NewIcons")
  906.             (dest "Thor:")
  907.             (pattern "~(THOR.guide.info)")
  908.             (nogauge)
  909.         )
  910.         (copyfiles
  911.             (prompt "Copying NewIcons icon files")
  912.             (source "Thor_Install:NewIcons/THOR.guide.info")
  913.             (dest "Thor:Docs")
  914.             (newname "THOR.guide.info")
  915.             (nogauge)
  916.         )
  917.         (copyfiles
  918.             (prompt "Copying NewIcons icon files")
  919.             (source "Thor_Install:NewIcons/THOR.guide.info")
  920.             (dest "Thor:Docs")
  921.             (newname "ConfigTHOR.guide.info")
  922.             (nogauge)
  923.         )
  924.         (copyfiles
  925.             (prompt "Copying NewIcons icon files")
  926.             (source "Thor_Install:NewIcons/THOR.guide.info")
  927.             (dest "Thor:Docs")
  928.             (newname "ARexx.guide.info")
  929.             (nogauge)
  930.         )
  931.         (copyfiles
  932.             (prompt "Copying NewIcons icon files")
  933.             (source "Thor_Install:NewIcons/THOR.guide.info")
  934.             (dest "Thor:Docs")
  935.             (newname "BBSReadRexx.guide.info")
  936.             (nogauge)
  937.         )
  938.         (copyfiles
  939.             (prompt "Copying NewIcons icon files")
  940.             (source "Thor_Install:NewIcons/THOR.guide.info")
  941.             (dest "Thor:Docs")
  942.             (newname "THOR_Rexx.guide.info")
  943.             (nogauge)
  944.         )
  945.         (copyfiles
  946.             (prompt "Copying NewIcons icon files")
  947.             (source "Thor_Install:NewIcons/THOR.guide.info")
  948.             (dest "Thor:Docs")
  949.             (newname "Installation.guide.info")
  950.             (nogauge)
  951.         )
  952.     )
  953. )
  954.  
  955. (if (exists "env:sys/def_drawer.info" (noreq))
  956.     (copyfiles
  957.         (prompt "Copying default drawer icon")
  958.         (help "This will copy the default drawer icon." newline @copyfiles-help)
  959.         (source "env:sys/def_drawer.info")
  960.         (dest "Thor:")
  961.         (newname "Docs.info")
  962.         (infos)
  963.     )
  964. )
  965.  
  966. ;*****************************
  967. ;***** WE ARE ALMOST DONE ****
  968. ;*****************************
  969.  
  970. ; make sure that default-dir is pointing to the right place
  971. (set @default-dest Thor_Dir)
  972.     
  973. ; final message for our viewers
  974.     (set end_text (cat "Hope you like THOR! Don't hesitate to "
  975.                     "send us comments, bugreports and suggestions."))
  976.  
  977. (makeassign "Thor_Install")     
  978.  
  979. (if (= V3_Update yes)
  980.     (
  981.         (makeassign "BBSData")     
  982.     )
  983. )
  984.  
  985. ; now for the exit
  986.     (exit end_text)
  987.  
  988.